package com.example.demo.repository;

import com.example.demo.bean.bis.Sign;
import com.example.demo.bean.dto.SignDay;
import com.example.demo.bean.dto.SignPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SignMapper {

    Sign findByDayAndUid(@Param("date") String date, @Param("id") Integer id);

    SignPlus findByUid(@Param("date") String date, @Param("len") Integer len, @Param("id") Integer id);

    //部门 经理日统计详情
    List<SignDay> findByDayDetails(@Param("date") String date, @Param("id") Integer id, @Param("deptId") Integer deptId);

    List<SignPlus> findByDay( @Param("id") String id,@Param("date")String date);

    List<SignPlus> findByDept(@Param("date") String date, @Param("len") Integer len, @Param("id") Integer id);

    List<SignPlus> findByDeptDetails(@Param("date") String date, @Param("len") Integer len, @Param("id") Integer id);
    //总经理日统计
    List<SignPlus> findByDayDept(@Param("date") String date);

    //部门日统计
    SignPlus findByDeptidAndDay(@Param("deptId")Integer deptId,@Param("date")String date);
    //部门月年统计
    SignPlus findByDeptidAndTime(@Param("deptId")Integer deptId,@Param("date")String date,@Param("len")Integer len);
    //部门月年统计
    List<SignPlus> findByDeptidAndTimeDetails(@Param("deptId")Integer deptId,@Param("date")String date,@Param("len")Integer len);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign
     *
     * @mbggenerated Wed Jul 11 16:02:50 CST 2018
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign
     *
     * @mbggenerated Wed Jul 11 16:02:50 CST 2018
     */
    int insert(Sign record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign
     *
     * @mbggenerated Wed Jul 11 16:02:50 CST 2018
     */
    Sign selectByPrimaryKey(@Param(value = "id") Integer id,@Param(value = "date")String date);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign
     *
     * @mbggenerated Wed Jul 11 16:02:50 CST 2018
     */
    List<Sign> selectAll();

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sign
     *
     * @mbggenerated Wed Jul 11 16:02:50 CST 2018
     */
    int updateByPrimaryKey(Sign record);
}